package com.zlt.pojo;

import java.util.List;

public class PageBean<T> {
    private int pageNum;        //第多少页
    private int pageCount;      //总共多少页
    private int pageSize = 10;  //每页多少条数据
    private List<T> data;       //返回的数据集合

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageCount() {
        return pageCount;
    }

    public void setPageCount(int totleCount) {
        int count = totleCount%pageSize==0 ? totleCount/pageSize : totleCount/pageSize+1;//能整除返回 结果，不能整除返回（结果+1）
        this.pageCount = count;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
